package com.proton.carepatchtemp.database.table;

import java.io.Serializable;
import java.util.List;

/**
 * Created by MoonlightSW on 2016/12/20.
 */

public class ShareHistory implements Serializable {

    /**
     * id : 21
     * name : 体温贴_91:AA
     * type : 1
     * btaddress : CC:78:AB:AC:91:AA
     * sharelist : [{"id":7,"uid":30,"deviceid":21,"shareto":"18157146697","shareby":"魔攻"}]
     */

    private int id;
    private String name;
    private int type;
    private String btaddress;
    private List<SharelistBean> sharelist;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getBtaddress() {
        return btaddress;
    }

    public void setBtaddress(String btaddress) {
        this.btaddress = btaddress;
    }

    public List<SharelistBean> getSharelist() {
        return sharelist;
    }

    public void setSharelist(List<SharelistBean> sharelist) {
        this.sharelist = sharelist;
    }

    public static class SharelistBean implements Serializable {
        /**
         * id : 7
         * uid : 30
         * deviceid : 21
         * shareto : 18157146697
         * shareby : 魔攻
         */

        private int id;
        private long uid;
        private int deviceid;
        private String shareto;
        private String shareby;
        private boolean canSend = true;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public long getUid() {
            return uid;
        }

        public void setUid(long uid) {
            this.uid = uid;
        }

        public int getDeviceid() {
            return deviceid;
        }

        public void setDeviceid(int deviceid) {
            this.deviceid = deviceid;
        }

        public String getShareto() {
            return shareto;
        }

        public void setShareto(String shareto) {
            this.shareto = shareto;
        }

        public String getShareby() {
            return shareby;
        }

        public void setShareby(String shareby) {
            this.shareby = shareby;
        }

        public boolean isCanSend() {
            return canSend;
        }

        public void setCanSend(boolean canSend) {
            this.canSend = canSend;
        }

        @Override
        public boolean equals(Object obj) {
            return SharelistBean.this.uid == ((SharelistBean) obj).getUid();
        }
    }
}
